package people;
//import java.util.*;

public class Personal {

    private String id;
    private String name;
    private boolean sex;
    private int age;

    public Personal() {
        this.id = "01";
        this.name = "Mark";
        this.sex = true;
        this.age = 18;
    }

    public Personal(String id, String name, boolean sex, int age) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        if (age < 1 || age > 100) {
            this.age = 18;
        }
        this.age = age;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getId(){
        toString("id: "+this.id);
        return this.id;
    }

    public String getName(){
        toString("name: "+this.name);
        return this.name;
    }

    public boolean getSex(){
        toString("sex: "+this.sex);
        return this.sex;
    }

    public int getAge(){
        toString("age: "+this.age);
        return this.age;
    }

    public void toString(String arg) {
        System.out.println(arg);
    }
}